home *** CD-ROM | disk | FTP | other *** search
- /* %filename% -- Modal dialog */
- /* Created %date% %time% by AppMaker */
-
- #include <Types.h>
- #include <Quickdraw.h>
- #include <Controls.h>
- #include <Dialogs.h>
- #include <Events.h>
- #include <Lists.h>
- #include <Menus.h>
- #include <TextEdit.h>
- #include "ResourceDefs.h"
- #include "Miscellany.h"
- #include "DialogAids.h"
- #include "WindowAids.h"
- #include "%dlogname%.h"
-
- %for each item gen itemNr%
-
- %If lang = MPW%
- #pragma segment %dlogname%
-
- %end if%
- %for each item gen auxiliaryProto%
- %if needsFilter%
- static pascal Boolean Filter%dlogname%% %(DialogPtr whichDialog,
- EventRecord *event,
- short *itemHit);
- %endif%
-
- %push needsRefCon%
- %for each item gen auxiliary%
- %if needsFilter%
- /*----------*/
- static pascal Boolean Filter%dlogname%% %(DialogPtr whichDialog,
- EventRecord *event,
- short *itemHit)
- {
- Boolean filtered;
- %dlogname%RecPtr% %data;
-
- #pragma unused (data)
-
- filtered = false;
- %for each item gen filter%
-
- if (!filtered) {
- filtered = StandardFilter (whichDialog, event, itemHit);
- }
- return (filtered);
- } /*Filter%dlogname%*/
-
- %endif%
- /*----------*/
- Boolean Get%dlogname% (%dlogname%Rec% %*%dlogname%)
- {
- DialogPtr theDialog;
- GrafPtr savePort;
- Boolean result;
- Boolean done;
- short itemNr;
- register %dlogname%RecPtr info;
-
- GetPort (&savePort);
- InitCursor ();
- theDialog = GetNewDialog (%dlogname%ID, nil, (WindowPtr) -1L);
- %if needsRefCon%
- SetWRefCon (theDialog, (long) %dlogname%);
- %endif%
- SetPort (theDialog);
- info = %dlogname%;
- %for each item gen set%
-
- ShowWindow (theDialog);
- OutlineButton (1);
- done = false;
- while (!done) {
- %for each item gen enable%
-
- %if procID = 5%
- %if needsFilter%
- MovableDialog ((ModalFilterProcPtr)Filter%dlogname%, &itemNr);
- %else%
- MovableDialog ((ModalFilterProcPtr)StandardFilter, &itemNr);
- %end if%
- %else%
- %if needsFilter%
- ModalDialog (Filter%dlogname%, &itemNr);
- %else%
- ModalDialog (StandardFilter, &itemNr);
- %end if%
- %end if%
- switch (itemNr) {
- %for each item gen hit%
-
- } /* switch */
- } /* while */
- %for each item gen finish%
-
- DisposDialog (theDialog);
- SetPort (savePort);
- return (result);
- } /*Get%dlogname%*/
-
- /* %dlogname% */
- %pop needsRefCon%
-